package com.example.factory.core.domain;

import javax.persistence.*;
import java.util.List;

/**
 * @author Lei Tao
 */
@Entity
@Table(name = "level_1_dimension")
public class Level1Dimension extends DomainObject {

    private String name;

    @OneToMany(mappedBy = "level1Dimension", fetch = FetchType.LAZY, orphanRemoval = true)
    private List<Level2Dimension> level2Dimensions;

    /**
     * 权重
     */
    private Float weight;

    private Integer sort;


    public Level1Dimension() {
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public List<Level2Dimension> getLevel2Dimensions() {
        return level2Dimensions;
    }

    public void setLevel2Dimensions(List<Level2Dimension> level2Dimensions) {
        this.level2Dimensions = level2Dimensions;
    }

    public Float getWeight() {
        return weight;
    }

    public void setWeight(Float weight) {
        this.weight = weight;
    }

    public Integer getSort() {
        return sort;
    }

    public void setSort(Integer sort) {
        this.sort = sort;
    }
}
